# coding=utf-8
import os
import qianfan


def gpt(question):

    QIANFAN_ACCESS_KEY = "ALTAKWd45u0vEAgubHsr2QFyQR"
    QIANFAN_SECRET_KEY = "425a27bee1ea40229636356db1be0253"

    os.environ["QIANFAN_ACCESS_KEY"] = QIANFAN_ACCESS_KEY
    os.environ["QIANFAN_SECRET_KEY"] = QIANFAN_SECRET_KEY

    chat_robot = qianfan.ChatCompletion()
    resp = chat_robot.do(
        messages=[{
            "role": "user",
            "content": question
        }]
    )
    return resp.body["result"]
